namespace VAdvantage.Model
{

/** Generated Model - DO NOT CHANGE */
using System;
using System.Text;
using VAdvantage.DataBase;
using VAdvantage.Common;
using VAdvantage.Classes;
using VAdvantage.Process;
using VAdvantage.Model;
using VAdvantage.Utility;
using System.Data;
/** Generated Model for AD_ShortCutParameter
 *  @author Jagmohan Bhatt (generated) 
 *  @version Vienna Framework 1.1.1 - $Id$ */
public class X_AD_ShortCutParameter : PO
{
public X_AD_ShortCutParameter (Context ctx, int AD_ShortCutParameter_ID, String trxName) : base (ctx, AD_ShortCutParameter_ID, trxName)
{
/** if (AD_ShortCutParameter_ID == 0)
{
SetAD_ShortCutParameter_ID (0);
SetAD_Shortcut_ID (0);
}
 */
}
public X_AD_ShortCutParameter (Ctx ctx, int AD_ShortCutParameter_ID, String trxName) : base (ctx, AD_ShortCutParameter_ID, trxName)
{
/** if (AD_ShortCutParameter_ID == 0)
{
SetAD_ShortCutParameter_ID (0);
SetAD_Shortcut_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ShortCutParameter (Context ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ShortCutParameter (Ctx ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ShortCutParameter (Ctx ctx, IDataReader dr, String trxName) : base(ctx, dr, trxName)
{
}

/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ShortCutParameter(int AD_Shortcut_ID)
{
}

/** Static Constructor 
 Set Table ID By Table Name
 added by ->Harwinder */
static X_AD_ShortCutParameter()
{
 Table_ID = Get_Table_ID(Table_Name);
 model = new KeyNamePair(Table_ID,Table_Name);
}
/** Serial Version No */
static long serialVersionUID = 27630591389848L;
/** Last Updated Timestamp 9/24/2012 11:24:33 AM */
public static long updatedMS = 1348466073059L;
/** AD_Table_ID=1000341 */
public static int Table_ID;
 // =1000341;

/** TableName=AD_ShortCutParameter */
public static String Table_Name="AD_ShortCutParameter";

protected static KeyNamePair model;
protected Decimal accessLevel = new Decimal(7);
/** AccessLevel
@return 7 - System - Client - Org 
*/
protected override int Get_AccessLevel()
{
return Convert.ToInt32(accessLevel.ToString());
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Context ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Ctx ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public override String ToString()
{
StringBuilder sb = new StringBuilder ("X_AD_ShortCutParameter[").Append(Get_ID()).Append("]");
return sb.ToString();
}
/** Set AD_ShortCutParameter_ID.
@param AD_ShortCutParameter_ID AD_ShortCutParameter_ID */
public void SetAD_ShortCutParameter_ID (int AD_ShortCutParameter_ID)
{
if (AD_ShortCutParameter_ID < 1) throw new ArgumentException ("AD_ShortCutParameter_ID is mandatory.");
Set_ValueNoCheck ("AD_ShortCutParameter_ID", AD_ShortCutParameter_ID);
}
/** Get AD_ShortCutParameter_ID.
@return AD_ShortCutParameter_ID */
public int GetAD_ShortCutParameter_ID() 
{
Object ii = Get_Value("AD_ShortCutParameter_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set AD_Shortcut_ID.
@param AD_Shortcut_ID AD_Shortcut_ID */
public void SetAD_Shortcut_ID (int AD_Shortcut_ID)
{
if (AD_Shortcut_ID < 1) throw new ArgumentException ("AD_Shortcut_ID is mandatory.");
Set_ValueNoCheck ("AD_Shortcut_ID", AD_Shortcut_ID);
}
/** Get AD_Shortcut_ID.
@return AD_Shortcut_ID */
public int GetAD_Shortcut_ID() 
{
Object ii = Get_Value("AD_Shortcut_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Encrypted.
@param IsEncrypted Display or Storage is encrypted */
public void SetIsEncrypted (Boolean IsEncrypted)
{
Set_Value ("IsEncrypted", IsEncrypted);
}
/** Get Encrypted.
@return Display or Storage is encrypted */
public Boolean IsEncrypted() 
{
Object oo = Get_Value("IsEncrypted");
if (oo != null) 
{
 if (oo.GetType() == typeof(bool)) return Convert.ToBoolean(oo);
 return "Y".Equals(oo);
}
return false;
}
/** Set Parameter Name.
@param ParameterName Parameter Name */
public void SetParameterName (String ParameterName)
{
if (ParameterName != null && ParameterName.Length > 50)
{
log.Warning("Length > 50 - truncated");
ParameterName = ParameterName.Substring(0,50);
}
Set_Value ("ParameterName", ParameterName);
}
/** Get Parameter Name.
@return Parameter Name */
public String GetParameterName() 
{
return (String)Get_Value("ParameterName");
}
/** Set Parameter Value.
@param ParameterValue Parameter Value */
public void SetParameterValue (String ParameterValue)
{
if (ParameterValue != null && ParameterValue.Length > 200)
{
log.Warning("Length > 200 - truncated");
ParameterValue = ParameterValue.Substring(0,200);
}
Set_Value ("ParameterValue", ParameterValue);
}
/** Get Parameter Value.
@return Parameter Value */
public String GetParameterValue() 
{
return (String)Get_Value("ParameterValue");
}
}

}
